import request from '@/utils/request'
//获取当前用户可用游戏列表
export function listGames() {
  return request({
    url: '/order/auto/getUserGameList',
    method: 'get',
  })
}

// 查询自动派单列表
export function listAuto(query) {
  return request({
    url: '/order/auto/list',
    method: 'get',
    params: query
  })
}

// 查询自动派单详细
export function getAuto(id) {
  return request({
    url: '/order/auto/' + id,
    method: 'get'
  })
}

// 新增自动派单
export function addAuto(data) {
  return request({
    url: '/order/auto',
    method: 'post',
    data: data
  })
}

// 修改自动派单
export function updateAuto(data) {
  return request({
    url: '/order/auto',
    method: 'put',
    data: data
  })
}

// 删除自动派单
export function delAuto(id) {
  return request({
    url: '/order/auto/' + id,
    method: 'delete'
  })
}
